<!DOCTYPE html>

{% set card = frappe.get_doc('EMS Equipment Card', equipment_number)  %}
 
<div>
    <h1>
        <!-- haha -->
        {{ equipment_number }}
    </h1>
    <h2>
        {{ equipment_name }}
    </h2>
    <h3>
        {{ card.equipment_model }}
    </h3>
    <br>
    <!-- 提交按钮 -->
    <input type="submit" id="submit-fault" value="提交">
</div>

<!-- <script src="fault.js"></script> -->
<script>
    window.frappe = {};
    frappe.ready_events = [];
    frappe.ready = function(fn) {
        frappe.ready_events.push(fn);
    }
    window.dev_server = 0;
    window.socketio_port = 9000;
    window.show_language_picker = false;
</script>

<!-- js should be loaded in body! -->
<script>
    frappe.boot = {'lang': 'zh', 'sysdefaults': {'float_precision': 3, 'date_format': 'yyyy-mm-dd', 'time_format': 'HH:mm:ss', 'first_day_of_the_week': 'Sunday', 'number_format': '#,###.##'}, 'time_zone': {'system': 'Asia/Chongqing', 'user': 'Asia/Chongqing'}, 'assets_json': {'bootstrap-4-web.bundle.js': '/assets/frappe/dist/js/bootstrap-4-web.bundle.FOZOVELL.js', 'controls.bundle.js': '/assets/frappe/dist/js/controls.bundle.FJWJ4D7C.js', 'data_import_tools.bundle.js': '/assets/frappe/dist/js/data_import_tools.bundle.QWANZLSZ.js', 'desk.bundle.js': '/assets/frappe/dist/js/desk.bundle.U7WYLDJ7.js', 'dialog.bundle.js': '/assets/frappe/dist/js/dialog.bundle.JUOABYOR.js', 'form.bundle.js': '/assets/frappe/dist/js/form.bundle.MF3WCSNW.js', 'frappe-web.bundle.js': '/assets/frappe/dist/js/frappe-web.bundle.B3EJID3V.js', 'libs.bundle.js': '/assets/frappe/dist/js/libs.bundle.TIV7ZGVY.js', 'list.bundle.js': '/assets/frappe/dist/js/list.bundle.NY3NAU6L.js', 'logtypes.bundle.js': '/assets/frappe/dist/js/logtypes.bundle.EKN7LWKW.js', 'onboarding_tours.bundle.js': '/assets/frappe/dist/js/onboarding_tours.bundle.RAUR6X4Z.js', 'report.bundle.js': '/assets/frappe/dist/js/report.bundle.KOLL3HBK.js', 'sentry.bundle.js': '/assets/frappe/dist/js/sentry.bundle.IPS6PK2M.js', 'telemetry.bundle.js': '/assets/frappe/dist/js/telemetry.bundle.LKEZCADB.js', 'user_profile_controller.bundle.js': '/assets/frappe/dist/js/user_profile_controller.bundle.ZJ6AYZ5P.js', 'video_player.bundle.js': '/assets/frappe/dist/js/video_player.bundle.DUYYLSFO.js', 'web_form.bundle.js': '/assets/frappe/dist/js/web_form.bundle.4766S2ZJ.js', 'form_builder.bundle.js': '/assets/frappe/dist/js/form_builder.bundle.QB2KYZWV.js', 'print_format_builder.bundle.js': '/assets/frappe/dist/js/print_format_builder.bundle.BECQAYTG.js', 'workflow_builder.bundle.js': '/assets/frappe/dist/js/workflow_builder.bundle.X2TBWGUV.js', 'build_events.bundle.js': '/assets/frappe/dist/js/build_events.bundle.X3I4LPG5.js', 'file_uploader.bundle.js': '/assets/frappe/dist/js/file_uploader.bundle.RT77Z3L4.js', 'kanban_board.bundle.js': '/assets/frappe/dist/js/kanban_board.bundle.AS3FI5GX.js', 'desk.bundle.css': '/assets/frappe/dist/css/desk.bundle.4P5D3PHG.css', 'email.bundle.css': '/assets/frappe/dist/css/email.bundle.ACTJJYDR.css', 'login.bundle.css': '/assets/frappe/dist/css/login.bundle.PNET3EBT.css', 'print.bundle.css': '/assets/frappe/dist/css/print.bundle.BFIV7X6U.css', 'print_format.bundle.css': '/assets/frappe/dist/css/print_format.bundle.JFBFEKVW.css', 'report.bundle.css': '/assets/frappe/dist/css/report.bundle.LLJFMNZH.css', 'web_form.bundle.css': '/assets/frappe/dist/css/web_form.bundle.MILIC57X.css', 'website.bundle.css': '/assets/frappe/dist/css/website.bundle.ROBOAWIT.css', 'bank-reconciliation-tool.bundle.js': '/assets/erpnext/dist/js/bank-reconciliation-tool.bundle.ALGDCWUD.js', 'erpnext-web.bundle.js': '/assets/erpnext/dist/js/erpnext-web.bundle.J4A2DQB4.js', 'erpnext.bundle.js': '/assets/erpnext/dist/js/erpnext.bundle.HNYG3LFD.js', 'item-dashboard.bundle.js': '/assets/erpnext/dist/js/item-dashboard.bundle.H7WI6L6N.js', 'point-of-sale.bundle.js': '/assets/erpnext/dist/js/point-of-sale.bundle.FVU3CC2F.js', 'bom_configurator.bundle.js': '/assets/erpnext/dist/js/bom_configurator.bundle.D2UVDA3I.js', 'erpnext-web.bundle.css': '/assets/erpnext/dist/css/erpnext-web.bundle.6WWWXJEY.css', 'erpnext.bundle.css': '/assets/erpnext/dist/css/erpnext.bundle.SFAXMKX4.css', 'erpnext_email.bundle.css': '/assets/erpnext/dist/css/erpnext_email.bundle.RSUEVMOQ.css', 'hierarchy-chart.bundle.js': '/assets/hrms/dist/js/hierarchy-chart.bundle.JG3XQ56U.js', 'hrms.bundle.js': '/assets/hrms/dist/js/hrms.bundle.GFS7LKWF.js', 'interview.bundle.js': '/assets/hrms/dist/js/interview.bundle.KMAFENQE.js', 'performance.bundle.js': '/assets/hrms/dist/js/performance.bundle.KDAWK7GO.js', 'hrms.bundle.css': '/assets/hrms/dist/css/hrms.bundle.HM6TDOQH.css', 'erpnext_chinese.bundle.js': '/assets/erpnext_chinese/dist/js/erpnext_chinese.bundle.LMFB6G5F.js', 'erpnext_oob.bundle.js': '/assets/erpnext_oob/dist/js/erpnext_oob.bundle.XIBT3IEK.js', 'zelin_permission.bundle.js': '/assets/zelin_permission/dist/js/zelin_permission.bundle.X5MGYYVQ.js', 'pdf.worker.bundle.js': '/assets/print_designer/dist/js/pdf.worker.bundle.3CMFYJAV.js', 'print_designer.bundle.js': '/assets/print_designer/dist/js/print_designer.bundle.KZTJQPQF.js', 'pdfjs.bundle.css': '/assets/print_designer/dist/css/pdfjs.bundle.XNVEXCXF.css', 'print_designer.bundle.css': '/assets/print_designer/dist/css/print_designer.bundle.H4RJ6TEG.css', 'rtl_desk.bundle.css': '/assets/frappe/dist/css-rtl/desk.bundle.LE3HLWOT.css', 'rtl_email.bundle.css': '/assets/frappe/dist/css-rtl/email.bundle.2HDYZ7IY.css', 'rtl_login.bundle.css': '/assets/frappe/dist/css-rtl/login.bundle.ECLF3I3M.css', 'rtl_print.bundle.css': '/assets/frappe/dist/css-rtl/print.bundle.SXQOKD5R.css', 'rtl_print_format.bundle.css': '/assets/frappe/dist/css-rtl/print_format.bundle.Z5CJAAK3.css', 'rtl_report.bundle.css': '/assets/frappe/dist/css-rtl/report.bundle.V3RVHDYE.css', 'rtl_web_form.bundle.css': '/assets/frappe/dist/css-rtl/web_form.bundle.GCYAO66Q.css', 'rtl_website.bundle.css': '/assets/frappe/dist/css-rtl/website.bundle.RKD2JEYR.css', 'rtl_erpnext-web.bundle.css': '/assets/erpnext/dist/css-rtl/erpnext-web.bundle.YAOUPFTY.css', 'rtl_erpnext.bundle.css': '/assets/erpnext/dist/css-rtl/erpnext.bundle.PH7DY26Z.css', 'rtl_erpnext_email.bundle.css': '/assets/erpnext/dist/css-rtl/erpnext_email.bundle.62GERILN.css', 'rtl_hrms.bundle.css': '/assets/hrms/dist/css-rtl/hrms.bundle.GTDYMNMN.css', 'rtl_pdfjs.bundle.css': '/assets/print_designer/dist/css-rtl/pdfjs.bundle.EEZ22DY7.css', 'rtl_print_designer.bundle.css': '/assets/print_designer/dist/css-rtl/print_designer.bundle.ZUPLCF7J.css'}, 'sitename': 'erpnext'}
    // for backward compatibility of some libs
    frappe.sys_defaults = frappe.boot.sysdefaults;
</script>
<script type="text/javascript" src="/assets/frappe/dist/js/frappe-web.bundle.B3EJID3V.js"></script>

<script type="text/javascript" src="/website_script.js"></script>
<script type="text/javascript" src="/assets/erpnext/dist/js/erpnext-web.bundle.J4A2DQB4.js"></script>

<script>frappe.csrf_token = "None";</script></body>

<script>
    document.querySelector("#submit-fault").addEventListener('click', 
        (e) => {
            console.log(123);
            frappe.call({
                method: 'ems.www.fault.index.my_requests1',
            })
            .then(r => {
            console.log(r)
            // {message: "pong"}
            })

            // frappe.msgprint('equipment_name')
        }
    )
</script>